<template>
    <el-dialog title="修改用户基本信息" :visible.sync="dialogVisible" width="400px">
      <el-form class="demo-form-inline" label-width="80px">
        <el-form-item label="名称">
          <el-input v-model="data.name" :disabled="true"/>
        </el-form-item>
        <el-form-item label="链接地址">
          <el-input v-model="data.url" />
        </el-form-item>
      <el-form-item label="LOGO">
          <el-upload
            class="upload-demo"
            action="/myupload/upload/img?type=brand"
            :file-list="fileList"
            list-type="picture"
          >
            <el-button size="small" type="primary">点击上传</el-button>
            <div slot="tip" class="el-upload__tip">只能上传jpg/png文件，且不超过500kb</div>
          </el-upload>
        </el-form-item>

        <el-form-item label="品牌精选图片">
          <el-upload
            class="upload-demo"
            action="/myupload/upload/img?type=brand"
            :file-list="fileLists"
            list-type="picture"
          >
            <el-button size="small" type="primary">点击上传</el-button>
            <div slot="tip" class="el-upload__tip">只能上传jpg/png文件，且不超过500kb</div>
          </el-upload>
        </el-form-item>
      </el-form>

      <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible = false">取 消</el-button>
        <el-button type="primary" @click="submit()">提 交</el-button>
      </span>
    </el-dialog>
</template>

<script>
import apibrandManage from "@/api/frontManage/brandManage";
export default {
  name:'barnd_edit',
  components:{},
  data(){
      return{
          dialogVisible:false,
          fileList:[],
          fileLists:[],
          data:{
              id:'',
              name:'',
          }
      }
  },
  methods:{
      //修改
      openEdit(row){
        apibrandManage.update(row).then(res=>{
        this.dialogVisible = true
        this.fileList = [{name:"logo",url:row.picturePathHttp}]
        this.fileLists = [{name:"品牌精选图片",url:row.bannerPathHttp}]
         
          })
      }
  }
}
</script>

<style  scoped>

</style>